:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --accent-color: #4895ef;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --gray-color: #6c757d;
  --success-color: #4cc9f0;
  --danger-color: #f72585;
  --border-radius: 8px;
  --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f7fb;
  color: var(--dark-color);
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* 帖子头部 */
.post-header {
  text-align: center;
  margin-bottom: 30px;
  position: relative;
}

.post-header h1 {
  color: var(--primary-color);
  font-size: 2.2em;
  margin-bottom: 15px;
  font-weight: 700;
}

.back-btn {
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 1.2em;
  display: flex;
  align-items: center;
}

.back-btn i {
  margin-right: 5px;
}

/* 帖子内容 */
.post-card {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.author-info {
  display: flex;
  align-items: center;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 15px;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2em;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.author-details h3 {
  color: var(--dark-color);
  margin-bottom: 5px;
}

.post-date {
  color: var(--gray-color);
  font-size: 0.9em;
}

.post-content-text {
  white-space: pre-line;
}

.post-tag {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8em;
  margin-left: 10px;
}

.post-content {
  margin-bottom: 30px;
  font-size: 1.1em;
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 20px;
}

.post-image {
  width: 100%;
  border-radius: var(--border-radius);
  margin: 20px 0;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s;
}

.post-image:hover {
  transform: scale(1.02);
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.gallery-image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: transform 0.3s;
}

.gallery-image:hover {
  transform: scale(1.05);
}

.post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.action-btn {
  display: flex;
  align-items: center;
  color: var(--gray-color);
  text-decoration: none;
  font-size: 0.9em;
  transition: color 0.3s;
}

.action-btn i {
  margin-right: 5px;
}

.action-btn:hover {
  color: var(--primary-color);
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
  box-shadow: 0 2px 10px rgba(67, 97, 238, 0.3);
}

.contact-btn i {
  margin-right: 8px;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
}

/* 评论区域 */
.comments-section {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
}

.section-title {
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
}

.section-title i {
  margin-right: 10px;
}

.comment-count {
  background-color: var(--primary-color);
  color: white;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.8em;
  margin-left: 10px;
}

.comment {
  display: flex;
  margin-bottom: 25px;
  position: relative;
}

.comment-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  margin-right: 15px;
  background: linear-gradient(135deg, var(--success-color), #4cc9f0);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.comment-content {
  flex-grow: 1;
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 0 var(--border-radius) var(--border-radius) var(--border-radius);
  position: relative;
}

.comment-content:before {
  content: '';
  position: absolute;
  left: -10px;
  top: 0;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-right: 10px solid #f8f9fa;
  border-bottom: 10px solid transparent;
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.comment-author {
  font-weight: 600;
  color: var(--dark-color);
}

.comment-date {
  color: var(--gray-color);
  font-size: 0.8em;
}

.comment-text {
  line-height: 1.6;
  margin-bottom: 10px;
}

.comment-actions {
  display: flex;
  align-items: center;
}

.reply-btn {
  color: var(--gray-color);
  font-size: 0.8em;
  text-decoration: none;
  margin-right: 15px;
  transition: color 0.3s;
}

.reply-btn:hover {
  color: var(--primary-color);
}

.reply-btn i {
  margin-right: 5px;
}

/* 回复评论 */
.reply {
  margin-left: 60px;
  margin-top: 15px;
  padding-left: 15px;
  border-left: 2px solid #eee;
}

/* 评论表单 */
.comment-form {
  margin-top: 30px;
}

.form-title {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-weight: 600;
}

textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  resize: vertical;
  min-height: 120px;
  margin-bottom: 15px;
  font-size: 1em;
  transition: border-color 0.3s;
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.submit-btn {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 1em;
  transition: all 0.3s;
  box-shadow: 0 2px 10px rgba(67, 97, 238, 0.3);
  display: inline-flex;
  align-items: center;
}

.submit-btn i {
  margin-right: 8px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.4);
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: var(--border-radius);
  max-width: 500px;
  width: 90%;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h2 {
  color: var(--primary-color);
  font-size: 1.5em;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5em;
  cursor: pointer;
  color: var(--gray-color);
  transition: color 0.3s;
}

.close-btn:hover {
  color: var(--danger-color);
}

.contact-info {
  margin-bottom: 20px;
}

.contact-info p {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.contact-info i {
  width: 24px;
  color: var(--primary-color);
  margin-right: 10px;
}

.copy-btn {
  background-color: var(--light-color);
  color: var(--dark-color);
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
  margin-left: 10px;
  transition: all 0.3s;
}

.copy-btn:hover {
  background-color: #e9ecef;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .post-card,
  .comments-section {
    padding: 20px;
  }

  .post-header h1 {
    font-size: 1.8em;
  }

  .image-gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .reply {
    margin-left: 30px;
  }
}

@media (max-width: 480px) {
  .post-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .author-info {
    margin-bottom: 10px;
  }

  .image-gallery {
    grid-template-columns: 1fr;
  }

  .comment {
    flex-direction: column;
  }

  .comment-avatar {
    margin-bottom: 10px;
  }

  .comment-content {
    border-radius: var(--border-radius);
  }

  .comment-content:before {
    display: none;
  }

  .reply {
    margin-left: 15px;
  }
}